package bishi.day15_5_11;

import java.util.Scanner;

/**
 * @author 是阿秋啊
 * @date 2022/05/12 13:38
 **/
public class er_jin_1count {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            int n = sc.nextInt();
            int count = 0;
            while (n > 0) {
                if ((n & 1) == 1) {
                    count++;
                }
                n >>= 1;
            }
            System.out.println(count);
        }
    }


}